#!/bin/bash
#PBS -N QRProfile
#PBS -l select=1:ncpus=1:mem=1gb:gpu=geforce
#PBS -l walltime=01:30:00
#PBS -l cput=01:30:00
#PBS -q feed@eiger170
#PBS -j oe
#PBS -o test.out

DATAFILE="test.data"
MATDIR="$HOME/Documents/mtx/*.mtx"

echo Working directory is $PBS_O_WORKDIR
cd $PBS_O_WORKDIR

module load cuda
echo "" > $DATAFILE
c=1
for i in $MATDIR ; do
	t=`./test $i`
	echo "$c	$t" >> $DATAFILE
	c=$[ $c + 1 ]
done
